<section class="container">
    <?
    $form = $this->beginWidget ( 'application.widgets.ActiveForm', array (
        'id' => 'albumForm',
        'enableClientValidation' => true,
        'htmlOptions' => array (
            'class'	=> 'form-horizontal mb0 well',
        )
    ) );
    ?> 
    	<legend>问题验证</legend>
	    <fieldset>
		    <? if(($flash = Yii::app()->user->getFlash('message')) !== null):?> 
		    	<div class="alert alert-info"><?=$flash?></div>
		    <?endif?> 
		    <div class="control-group">
		        <?=$form->labelEx($question, 'question', array('class' => 'control-label'))?> 
		        <dd class="controls">
		            <?=$form->textField($question, 'question', array('disabled' => true))?> 
		        </dd>
		    </div>
		    <div class="control-group <?=$question->hasErrors('answer') ? 'error' : '';?>">
		        <?=$form->labelEx($question, 'answer', array('class' => 'control-label'))?> 
		        <dd class="controls">
		            <?=$form->textField($question, 'answer')?> 
		            <?=$form->error($question, 'answer', array('class' => 'help-inline'))?> 
		        </dd>
		    </div>
		    <div class="form-actions mb0">
		        <?=CHtml::submitButton('提交', array('id' => 'authorQuestionBtn','class' => 'btn btn-tall btn-wide btn-primary'))?> 
		    </div>
	    </fieldset>
    <? $this->endWidget();?>
</section>
<?php 
$script = <<<EOF
Core.use('global', function(){
	//表单提交时按钮不可以用
	var authorQuestionBtn = $('#authorQuestionBtn')
	authorQuestionBtn.click(function(){
		Core.Util.btnDisable(authorQuestionBtn);
	});
});
EOF;
Yii::app()->clientScript->registerScript($this->id, $script);
?>
